package org.jay.angla.fragment;

import org.jay.angla.onlab.R;
import org.jay.angla.utils.Contants;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Fragment;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

@SuppressLint("NewApi")
public class FragmentMain extends Fragment implements View.OnClickListener {

	private ImageView mGdcl;
	private ImageView mDlfx;
	private FragmentCallbackListener mListener;

	@Override
	public void onAttach(Activity activity) {
		// TODO Auto-generated method stub
		mListener = (FragmentCallbackListener) activity;
		super.onAttach(activity);
	}

	@Override
	public void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
	}

	@Override
	public void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		View rootView = inflater.inflate(R.layout.fragment_main, container,
				false);
		mGdcl = (ImageView) rootView.findViewById(R.id.btn_guangduceliang);
		mDlfx = (ImageView) rootView.findViewById(R.id.btn_dingliangfenxi);
		mGdcl.setOnClickListener(this);
		mDlfx.setOnClickListener(this);
		return rootView;
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		mListener.onMainClick(v);
	}

}
